import java.util.Scanner;

public class Target2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int target = sc.nextInt();
        int sign=0;
        int []arr = new int[n];
        for(int i=0;i<n;i++){
            arr[i]=sc.nextInt();
            if(target>arr[i]){
                sign++;
            }
            if(target==arr[i]){
                System.out.println(i);
                return;
            }
        }
        System.out.println(sign);
    }
}
